<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="./js/jQuery.min.js"></script>
<style>
    ul {
        list-style: none
    }

    * {
        margin: 0;
        padding: 0;
    }

    div {
        width: 1150px;
        height: 400px;
        margin: 50px auto;
        border: 1px solid red;
        overflow: hidden;
    }

    div li {
        width: 240px;
        height: 400px;
        float: left;
    }

    div ul {
        width: 1300px;
    }

    #box .current {
        width: 900px;
    }



    #box .small {
        width: 90px;
    }
</style>

<body>
    <div id="box">
        <ul>
            <li class="current"><img src="images/1.jpg" /></li>
            <li class="small"><img src="images/2.jpg" /></li>
            <li class="small"><img src="images/3.jpg" /></li>
            <li class="small"><img src="images/4.jpg" /></li>
            <li class="small"><img src="images/5.jpg" /></li>
        </ul>
    </div>

    <script>
        // hover可以代表鼠标经过和离开事件
        $('li').hover(function () {
            $(this).stop().animate({
                "width": "900px",
            }).siblings().stop().animate({
                'width': '90px'
            })
        }, function () {
            $(this).stop().animate({
                'width': '240px'
            }).siblings().stop().animate({
                'width': '240px'
            })
        })
    </script>
</body>

</html>